package com.qdlc.p2p.biz.service.lottery;

import java.util.List;

import com.qdlc.p2p.dal.common.model.jpa.PageDataList;
import com.qdlc.p2p.dal.dto.Lottery;
import com.qdlc.p2p.dal.dto.User;
import com.qdlc.p2p.dal.model.LotteryModel;

/**
 * 抽奖服务
 */
public interface LotteryService {

    Object process(User user,int category);

    /**
     * 抽奖配置
     * @param model
     * @return
     */
    Lottery save(LotteryModel model);

    Lottery update(Lottery lottery);

    PageDataList<Lottery> getAllLottery(LotteryModel model);

    Lottery findById(long id);

    double getTotalRate(int category);

    List<Lottery> getLotteryByCategory(int category);

}
